<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>交易列表</title>
</head>
<body>


<button class="ui-button" onclick="excelExport('/tradeFlush/excelOut')" style="margin-left: 88%;margin-bottom: 1%;margin-top: 1%">导出</button>
<!--<input type="hidden" value="offerId" id="offerId" th:value="${offerId}">-->

<table class="ui-table">
    <thead>
        <tr>
            <th>序号</th>
            <th>物品</th>
            <th>价格</th>
            <th>数量</th>
            <th>买方</th>
            <th>卖方</th>
            <th>成交时间</th>
        </tr>
    </thead>

    <tbody>
        <tr th:each="info,infoStat : ${page.list}" >
            <td th:classappend="${(info.seller == session.user.id or info.buyer == session.user.id) ? 'ppp':''}" th:text="${infoStat.index}"></td>
            <td th:classappend="${(info.seller == session.user.id or info.buyer == session.user.id) ? 'ppp':''}"  th:text="${info.goodName} + ${info.buyer}+${info.seller}"></td>
            <td th:classappend="${(info.seller == session.user.id or info.buyer == session.user.id) ? 'ppp':''}"  th:text="${info.price}"></td>
            <td th:classappend="${(info.seller == session.user.id or info.buyer == session.user.id) ? 'ppp':''}"  th:text="${info.amount}"></td>
            <td th:text="${info.buyerName}"></td>
            <td th:text="${info.sellerName}"></td>
            <td th:classappend="${(info.seller == session.user.id or info.buyer == session.user.id) ? 'ppp':''}"  th:text="${#dates.format(info.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
        </tr>
    </tbody>
</table>
<!-- 底部分页 -->
<!-- 底部分页 -->
<form id="form" style="display: flex;justify-content: center">
    当前页  （<a  th:text="${page.currentPage+1}"  />）
    <a onclick="loadPage('/tradeFlush/list', - 1)" th:if="${page.currentPage > 0}">上一页</a>
    <a onclick="loadPage('/tradeFlush/list',1)" th:if = "${page.currentPage < (page.totalPage - 1)}">下一页</a>
    共      <a style="color: #2a80eb"  th:text="${page.total}" />条|
    <a style="color: #2a80eb"  th:text="${page.totalPage}" />页
    每页    <a style="color: #f59b00"  th:text="${page.pageSize}" />条

    <input type="hidden" name="pageSize" th:value="${page.pageSize}" />
    <input name="currentPage" id="currentPage" type="hidden" th:value="${page.currentPage}"  />
    <input name="flag" id="flag" type="hidden" value="0"   />
</form>



</body>
</html>